<template>
  <view class="favorites-container">
    <!-- 收藏列表 -->
    <view class="favorites-list" v-if="favorites.length > 0">
      <view class="favorite-item" v-for="item in favorites" :key="item.id">
        <view class="product-image">
          <image :src="item.image" mode="aspectFit" />
        </view>
        
        <view class="product-info">
          <text class="product-title">{{item.title}}</text>
          <view class="price-info">
            <text class="current-price">¥{{item.currentPrice}}</text>
          </view>
        </view>
      </view>
    </view>
    
    <!-- 空状态 -->
    <view class="empty-state" v-else>
      <image src="http://gips0.baidu.com/it/u=1690853528,2506870245&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024" />
      <text class="empty-text">暂无收藏内容</text>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      favorites: [
        {
          id: 1,
          title: '时尚潮流T恤 夏季新品',
          image: 'http://gips0.baidu.com/it/u=1690853528,2506870245&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024',
          currentPrice: '89.00'
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.favorites-container {
  background-color: #f5f5f5;
  min-height: 100vh;
}

.favorites-list {
  .favorite-item {
    background-color: #ffffff;
    margin-bottom: 20rpx;
    padding: 30rpx;
    display: flex;
    
    .product-image {
      width: 200rpx;
      height: 200rpx;
      margin-right: 30rpx;
      border-radius: 12rpx;
      overflow: hidden;
      
      image {
        width: 100%;
        height: 100%;
      }
    }
    
    .product-info {
      flex: 1;
      
      .product-title {
        font-size: 32rpx;
        color: #333333;
        font-weight: bold;
        margin-bottom: 10rpx;
        display: block;
      }
      
      .price-info {
        .current-price {
          font-size: 36rpx;
          color: #ff6b35;
          font-weight: bold;
        }
      }
    }
  }
}

.empty-state {
  text-align: center;
  padding: 200rpx 40rpx;
  
  image {
    width: 200rpx;
    height: 200rpx;
    margin-bottom: 40rpx;
    opacity: 0.5;
  }
  
  .empty-text {
    font-size: 28rpx;
    color: #999999;
  }
}
</style> 